<header>
    
  </header>
  <body>
      hello,this is fljs demo
      <div id="app"></div>
    <script src="./index.js"></script>
    <script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
    <script src="https://cdn.bootcdn.net/ajax/libs/vue/2.6.14/vue.js"></script>
    <script>
        FLJS.init({
          apikey:'15f68f07f9666362636dd7d021953200',
          polymerization:true,
          spa:true,
          dsn:'http://log.maysan.cn/log/'
      })
        Vue.use(FLJS.vuePlugin)

        new Vue({
          el:"#app",
          template:`
            <div>
              <button @click="clickTest">请求</button>
              <button @click="clickTest1">页面跳转</button>
              <button @click="clickTest2">测试打印</button>
              <div class="aaa" id="333">
                <button id="dd" class="sdfsd sdafs5" @click="clickTest3">测试vue错误</button>
              </div>
              <button @click="clickTest5">上报日志</button>
            </div>
          `,
          data(){
            return {
              page:0
            }
          },
          created(){
           
          },
          mounted(){
            $.post({url:"https://prestghlk.meiguanjia.net/api/login",timeout: 4000}).done(function(d){
                console.log(d,4444)
            })
            // console.log(123+a)
          },
          methods:{
            clickTest3(){
              console.log(123+a)
            },
            clickTest2(){

            },
            clickTest1(){
              location.href=`#${this.page++}`
            },
            clickTest5(){
              FLJS.log("hahah","dafdafa",{dddss:"dasdfas"})
            },
            clickTest(){
              console.log(22222222)
              $.get("https://prestghlk.meiguanjia.net/api/account/13265451592").done(function(d){
                console.log(d)
              }).catch(e=>{
                console.log(e)
              })
            }
          }
        })

        setTimeout(()=>{
            throw new Error(111)
        },2000)
        async function asyncFuntion() {
          return new Promise((resolve, reject) => {
            setTimeout(() => reject(new Error('rejection')), 500);
          })
        }
        asyncFuntion()
        // setTimeout(()=>{
        //     location.href="#1"
        // },3000)
        // setTimeout(()=>{
        //     // debugger
        //     m.log({
        //         message: '这是测试2',
        //         level:'else',
        //         // 可选
        //         tag: '活动页统计'
        //     })
        // },5000)
      </script>
  </body>